Dynomotion

Group: DynoMotion Message: 9 From: azken98 Date: 12/30/2008
Subject: Kmotion: how to read current position using c parogram
I ve just started with KMotion, i ve KMotion board .
I ve connected the encoder channels A and B to the KMotion JP3 pins 15
and 16.
Now I want to test the Encoder position, any help?
thanks
Azed
Group: DynoMotion Message: 10 From: TK Date: 12/30/2008
Subject: Re: Kmotion: how to read current position using c parogram

Azed,

 

Run the Kmotion.exe program.  Since you have a KMotion board.  Make sure the KFLOP option is not checked under the option menu.

 

Open the Axis Screen.  Does the Position of Axis #0 change when you rotate the encoder?

 

You should also be able to see the two input bits #0 and #1 change randomly on the Digital IO screen when you rotate the encoder.

 

If all this works you can print the encoder position from a C program with something like:

 

            printf(“Encoder 0 = %f\n”,ch0->Position);

 

TK

 

Group: DynoMotion Message: 11 From: Azd Md Date: 12/30/2008
Subject: Re: Kmotion: how to read current position using c parogram
Thanks TK for your reply
I ve tried this itw orsk with the SnapAmp but not with the Kmotion.
could it be that the default setup of the IO pins is digital output , not encoder??
thanks
Azed

--- On Wed, 12/31/08, TK <tk@...> wrote:
From: TK <tk@...>
Subject: RE: [DynoMotion] Kmotion: how to read current position using c parogram
To: DynoMotion@yahoogroups.com
Date: Wednesday, December 31, 2008, 2:25 PM

Azed,

 

Run the Kmotion.exe program.  Since you have a KMotion board.  Make sure the KFLOP option is not checked under the option menu.

 

Open the Axis Screen.  Does the Position of Axis #0 change when you rotate the encoder?

 

You should also be able to see the two input bits #0 and #1 change randomly on the Digital IO screen when you rotate the encoder.

 

If all this works you can print the encoder position from a C program with something like:

 

            printf(“Encoder 0 = %f\n”,ch0->Position);

 

TK

 


From: DynoMotion@yahoogro ups.com [mailto:DynoMotion@ yahoogroups. com] On Behalf Of azken98
Sent: Tuesday, December 30, 2008 9:29 PM
To: DynoMotion@yahoogro ups.com
Subject: [DynoMotion] Kmotion: how to read current position using c parogram

 

I ve just started with KMotion, i ve KMotion board .
I ve connected the encoder channels A and B to the KMotion JP3 pins 15
and 16.
Now I want to test the Encoder position, any help?
thanks
Azed

Checked by AVG - http://www.avg. com
Version: 8.0.176 / Virus Database: 270.10.1/1868 - Release Date: 12/30/2008 12:06 PM


Group: DynoMotion Message: 12 From: TK Date: 12/31/2008
Subject: Re: Kmotion: how to read current position using c parogram

Hi Azed,

 

All IO pins should default as inputs.  You can verify this on the Digital IO Screen.

 

Axis channel #0 defaults to read encoder channel #0 which would be KMotion Encoder #0

 

Axis channel #4 defaults to read encoder channel #4 which would be SnapAmp0 Encoder #0

 

Are you connecting a ground and +5V to the encoder?  (sorry had to ask).

 

SnapAmp has differential encoder inputs (A, /A, B, /B) where KMotion only has single ended encoder inputs (A and B).  Do you understand the difference?  For single ended just connect 2 of the 4 signal wires.  Can you see the IO bits toggle on the Digital IO Screen?

 

TK

 

Group: DynoMotion Message: 13 From: Azd Md Date: 1/2/2009
Subject: Re: Kmotion: how to read current position using c parogram
HI TK
with Snap Amp its working fine, however with KMotion, some times i have to dbl click on the OUTPUTS before it works, I dont know why!.
The other thing is that, with the Kflop and Kanalog configuration the encoder input channels can not tolerate "my"  5V encoder signals as stated in the spec, when i used 74ls245 buffer IC they also fine.
Sure u can ask anything,  I have a basic knowlege on this stuff. but as far as   Dynomotion is concerned, I am new.

Have a nice day.

Azed


--- On Thu, 1/1/09, TK <tk@...> wrote:
From: TK <tk@...>
Subject: RE: [DynoMotion] Kmotion: how to read current position using c parogram
To: DynoMotion@yahoogroups.com
Date: Thursday, January 1, 2009, 6:01 AM

Hi Azed,

 

All IO pins should default as inputs.  You can verify this on the Digital IO Screen.

 

Axis channel #0 defaults to read encoder channel #0 which would be KMotion Encoder #0

 

Axis channel #4 defaults to read encoder channel #4 which would be SnapAmp0 Encoder #0

 

Are you connecting a ground and +5V to the encoder?  (sorry had to ask).

 

SnapAmp has differential encoder inputs (A, /A, B, /B) where KMotion only has single ended encoder inputs (A and B).  Do you understand the difference?  For single ended just connect 2 of the 4 signal wires.  Can you see the IO bits toggle on the Digital IO Screen?

 

TK

 


From: DynoMotion@yahoogro ups.com [mailto:DynoMotion@ yahoogroups. com] On Behalf Of Azd Md
Sent: Tuesday, December 30, 2008 10:46 PM
To: DynoMotion@yahoogro ups.com
Subject: RE: [DynoMotion] Kmotion: how to read current position using c parogram

 

Thanks TK for your reply
I ve tried this itw orsk with the SnapAmp but not with the Kmotion.
could it be that the default setup of the IO pins is digital output , not encoder??
thanks
Azed

--- On Wed, 12/31/08, TK <tk@dynomotion. com> wrote:

From: TK <tk@dynomotion. com>
Subject: RE: [DynoMotion] Kmotion: how to read current position using c parogram
To: DynoMotion@yahoogro ups.com
Date: Wednesday, December 31, 2008, 2:25 PM

Azed,

 Run the Kmotion.exe program.  Since you have a KMotion board.  Make sure the KFLOP option is not checked under the option menu.

 Open the Axis Screen.  Does the Position of Axis #0 change when you rotate the encoder?

 You should also be able to see the two input bits #0 and #1 change randomly on the Digital IO screen when you rotate the encoder.

 If all this works you can print the encoder position from a C program with something like:

             printf(“Encoder 0 = %f\n”,ch0->Position);

  TK

 


From: DynoMotion@yahoogro ups.com [mailto:DynoMotion@ yahoogroups. com] On Behalf Of azken98
Sent: Tuesday, December 30, 2008 9:29 PM
To: DynoMotion@yahoogro ups.com
Subject: [DynoMotion] Kmotion: how to read current position using c parogram

 

I ve just started with KMotion, i ve KMotion board .
I ve connected the encoder channels A and B to the KMotion JP3 pins 15
and 16.
Now I want to test the Encoder position, any help?
thanks
Azed

Checked by AVG - http://www.avg. com
Version: 8.0.176 / Virus Database: 270.10.1/1868 - Release Date: 12/30/2008 12:06 PM

 

Checked by AVG - http://www.avg. com
Version: 8.0.176 / Virus Database: 270.10.1/1870 - Release Date: 12/31/2008 8:44 AM


Group: DynoMotion Message: 14 From: Tom Kerekes Date: 1/5/2009
Subject: Re: Kmotion: how to read current position using c parogram
Hi Azed,

Regarding Encoder connected to KMotion:
A single click should change the IO to an output (not a double click).  It's not a good idea to connect two outputs together as they will "fight" each other.   Maybe your encoders have open collector outputs that require a pullup resistor?

Regarding Kanalog:
The requirement is a differential signal.  Kanalog has on board 400ohm termination resistors (SnapAmp does not).  It may be that your encoder doesn't have enough current drive for the 400 ohm termination. 

The way to diagnose these issues is to use a oscilloscope (or even a voltmeter) and check what voltage levels you have before and after you make the connection.

I hope this helps
TK